<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>


<script src="${pageContext.request.contextPath}/js/calendar_ru.js"
	type="text/javascript"></script>
	<link href="style.css" rel="stylesheet" type="text/css" >
	<body class="body" >
	
		
		<html:form action="/searchListing" method="POST"  >
			<table class="search" border="0">

				<tr>
					<td colspan="2">
						<logic:present name="selectedStantion" scope="request">
				        Selected Device: ${selectedStantion.name}
				        </logic:present> 
				        
				        <logic:notPresent name="selectedStantion" scope="request">
				      
				        </logic:notPresent> 
				        <br />
						<br />
						
						<logic:present name="selectedStantion" scope="request">
				        Selected Devicess: ${selectedStantion.name}
				        </logic:present>
				    </td>
				</tr>
				<tr>
					<td  >    
				        
				        <bean:message key="label.from"/>
				        <input type="text" style="font-size: 24px" name="searchFrom" size="20">
				        <html:errors property="searchFrom" /> 
					</td>
					<td >
					
						
						
						<bean:message key="label.to" />
						<input type="text" style="font-size: 24px" name="searchTo" size="20">
						<html:errors property="searchTo" />
					</td>
				</tr>
				</table>
			<table class="search2" border="0">
				<tr>
					<td >
					
						<bean:message key="label.date" />
						<input type="text" style="font-size: 24px" size="20"
								name="date_routs" value="" onfocus="this.select();lcs(this)"
								onclick="event.cancelBubble=true;this.select();lcs(this)" maxlength="10">
						<html:errors property="date_routs" />
					</td>
					<td>	
						<html:submit> <bean:message key="button.search" /></html:submit>
						
					</td>
				</tr>
			</table>
			</html:form>
			<html:form action="/searchListing" method="POST">
				<table class="search3" border="0">
					<tr >
						<td align="left">
							${messages}</br>
							<c:forEach var="rout" items="${searchs}">
								<html:radio property="id_routs" value="${rout.id_routs}">${searchFrom} - ${searchTo}  * <b>${rout.id_routs} _ ${rout.name_routs}</b> 
								<input type="hidden" style="font-size: 24px" name="cityFrom" size="20" value="${lcityFrom.id_city}">
								<input type="hidden" style="font-size: 24px" name="cityTo" size="20" value="${lcityTo.id_city}">
								</html:radio><br/>
							</c:forEach>
						</td>
					</tr>
					<tr>
						<td>
							
							<html:submit> <bean:message key="button.book" /></html:submit>
							
						</td>
					</tr>
			</table>
		</html:form>
	</body>
		
	

